<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title> 分类管理-编辑 </title>
		<meta name="renderer" content="webkit">
		<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
		<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
		<meta name="apple-mobile-web-app-status-bar-style" content="black">
		<meta name="apple-mobile-web-app-capable" content="yes">
		<meta name="format-detection" content="telephone=no">
		<script src="js/jquery.min.js"></script>
		<script src="js/common.js"></script>
		<link rel="stylesheet" href="css/admin/x-admin.css" media="all">
		<link rel="stylesheet" href="css/lib/layui/css/layui.css" media="all">
	</head>
	<body>
		<div class="x-body">
			<form class="layui-form">
				<div class="layui-form-item"> <label for="name" class="layui-form-label"> <span
							class="x-red">*</span>分类名称 </label>
					<div class="layui-input-inline"> <input type="text" id="name" name="name" required
							lay-verify="required" autocomplete="off" class="layui-input" data-cid="${editResult.id}"
							value="${editResult.name}"> </div>
				</div>
				<div class="layui-form-item"> <label for="L_repass" class="layui-form-label"> </label> <button
						id="L_repass" class="layui-btn" lay-filter="add" lay-submit=""> 完成 </button> </div>
			</form>
		</div>
		<script src="css/lib/layui/layui.js" charset="utf-8"></script>
		<script src="js/admin/x-layui.js" charset="utf-8"></script>
		<script>
			layui.use(['form', 'layer', 'upload'], function() {
						$ = layui.jquery;
						var form = layui.form(),
							layer = layui
							.layer; //监听提交        form.on('submit(add)', function(data){            console.log(data);            var id = $('#name').attr("data-cid")            var name = $('#name').val()            $.ajax({                url:"/admin/save_edit_catelog",                type:"GET",                data:{                    id:id,                    name:name                },                success:function () {                }            })            layer.alert("修改成功", {icon: 6},function () {                // 获得frame索引                var index = parent.layer.getFrameIndex(window.name);                //关闭当前frame                parent.layer.close(index);                //刷新父页靿                parent.location.reload();            });            return false;        });    });
		</script>
		<script>
			var _hmt = _hmt || [];
			(function() {
				var hm = document.createElement("script");
				var s = document.getElementsByTagName("script")[0];
				s.parentNode.insertBefore(hm, s);
			})();
		</script>
	</body>
</html>
